<template>
  <VisualEditor v-model="jsonData" :config="visualConfig" />
</template>

<script lang="ts">
import { defineComponent } from "vue";
import { VisualEditor } from "./packages/visual-editor";
import { visualConfig } from "./packages/visual.config";

export default defineComponent({
  name: "App",
  components: {
    VisualEditor
  },
  data() {
    return {
      jsonData: {
        container: {
          width: 700,
          height: 800
        },
        blocks: [
          {
            top: 100,
            left: 100,
            adjustPosition: true,
            componentKey: "button"
          },
          {
            top: 200,
            left: 200,
            adjustPosition: true,
            componentKey: "input"
          },
          {
            top: 300,
            left: 200,
            adjustPosition: true,
            componentKey: "text"
          }
        ]
      },
      visualConfig
    };
  }
});
</script>
<style lang="scss">
html,
body {
  margin: 0;
  padding: 0;
}
</style>
